home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zoom 2
/
Zoom - Release 2 (1996)(Active Software)[!].iso
/
texts
/
dosman121
/
man
/
failat
< prev
next >
Wrap
Text File
|
1995-05-05
|
2KB
|
49 lines
Failat(V1.3 in C:) (2.x, 3.x internal)
NAME
Failat - To set a fail level for a batch file.
SYNOPSIS
Failat RCLim
DESCRIPTION
When using Execute to run scripts, any command that
returns an error greater than the current value of the
Fail level will cause the shell to abort the script with
an error message. You can use Failat to increase or
decrease this level to whatever you need. The shell will
reset the Fail level (usually 5, 10, 20 but can be any
number) at the end of every script execution, so scripts
always start out in a known state.
Under 2.x/3.x the result code is stored int the
environment variable RC, which is represented by $rc. The
bigger the return code, the bigger the error. If the
severity of the error is higher than the number you set
then the script stops running.
Once your FAILAT has been run in the script, the
FAILAT level returns to 10.
You can use FAILAT to a very high number and test the
return codes that any of your IF statements return.
EXAMPLE
1. To temporarily set the failure level to 30
Failat 30
This now makes it possible to execute commands that return
error codes greater than 20, which would ordinarily cause
Execute to stop with an error message.
2. To display the current failure level threshold.
Failat